home *** CD-ROM | disk | FTP | other *** search
/ Best of Shareware / Best of PC Windows Shareware 1.0 - Wayzata Technology (7111) (1993).iso / mac / DOS / MATH / FSULTRA1 / ULTRX_FR.ASM < prev    next >
Assembly Source File  |  1992-06-18  |  2KB  |  111 lines

  1. comment ! 
  2. FSU - ULTRA    The greatest random number generator that ever was
  3.         or ever will be.  Way beyond Super-Duper.
  4.         (Just kidding, but we think its a good one.)
  5.  
  6. Authors:    Arif Zaman (arif@stat.fsu.edu) and
  7.         George Marsaglia (geo@stat.fsu.edu).
  8.  
  9. Date:        27 May 1992
  10.  
  11. Version:    1.05
  12.  
  13. Copyright:    To obtain permission to incorporate this program into
  14.         any commercial product, please contact the authors at
  15.         the e-mail address given above or at
  16.  
  17.         Department of Statistics and
  18.         Supercomputer Computations Research Institute
  19.         Florida State University
  20.         Tallahassee, FL 32306.
  21.  
  22. See Also:    README        for a brief description
  23.         ULTRA.DOC    for a detailed description
  24.  
  25. -----------------------------------------------------------------------
  26. ;
  27. ; File:  ULTRX_FR.ASM (80386 IBM Fortran/2 calling conventions)
  28. ;
  29.    DOSSEG
  30.    .MODEL huge,fortran
  31.  
  32. ;===== B: GLOBAL FUNCTIONS, SUBROUTINES and VARIABLES =================
  33. ;
  34.     public  i31bit, i15bit, i7bit,  i1bit,  uni,    duni
  35.     public  i32bit, i16bit, i8bit,  rinit,  vni,    dvni
  36.     public    swbstate, swbsize
  37.  
  38. ;===== D. MACRO DEFINITIONS ===========================================
  39. ;
  40. ; RinitProcStart should take two 32-bit arguments conx and shrx
  41. ;   and place them in eax and ebx.
  42. ;   es and ds should both point to the data segment.
  43. ;   conx must be odd (so we or with 1 just to make sure).
  44. ; FillProc
  45. ;   DS is already the data segment. ES should also be made the same.
  46.  
  47. EnterProcedure   macro
  48.     mov  dx,DATA
  49.     push ds
  50.     mov  ds,dx
  51. endm
  52.  
  53. ExitProcedure    macro
  54.     pop ds
  55.     ret
  56. endm
  57.  
  58. Enter2arg    macro          ; fortran has call by reference.
  59.     proc conx:dword, shrx:dword
  60.     EnterProcedure
  61.     mov  ax,ds
  62.     mov  es,ax
  63.     lds  si,ShrX
  64.     lodsd                   ; load shrx in ebx
  65.     mov  ebx,eax
  66.     lds  si,ConX            ; and  conx in eax
  67.     lodsd
  68.     shl  eax,1
  69.     or   al,1               ;  ( congx must be odd )
  70. endm
  71.  
  72. Exit2arg     macro
  73.     ExitProcedure
  74. endm
  75.  
  76. EnterFill    macro
  77.     mov    ax,ds
  78.     mov    es,ax
  79. endm
  80.  
  81. ExitFill    macro
  82.     ret
  83. endm
  84.  
  85. DwordFn macro
  86. endm
  87.  
  88. WordFn  macro
  89. endm
  90.  
  91. ByteFn  macro
  92.     cbw                ; fortran doesn't have bytes so return integer*2
  93. endm
  94.  
  95. RealFn  macro
  96. endm
  97.  
  98. DoubleFn macro
  99. endm
  100.  
  101. DATA SEGMENT WORD PUBLIC 'F@DATA'
  102.   INCLUDE ULTRADAT.INC
  103. DATA ENDS
  104.  
  105. F@ICODE SEGMENT WORD PUBLIC 'CODE'
  106. ASSUME CS:F@ICODE, DS:DATA
  107.   INCLUDE ULTRxCOD.INC
  108. F@ICODE ENDS
  109. END
  110.